package com.csht.page;

/**
 * 分页设置参数线程类
 * @author chenhuiyan
 *
 */
public class SystemContext {

	private static ThreadLocal<Integer> offset = new ThreadLocal<Integer>();
	
	//消息通知每页记录数
	private static ThreadLocal<Integer> noticePageSize = new ThreadLocal<Integer>();
	
	//留言每页记录数
	private static ThreadLocal<Integer> messagePageSize = new ThreadLocal<Integer>();
	
	//商品列表每页记录数
	private static ThreadLocal<Integer> goodsListPageSize = new ThreadLocal<Integer>();
	
	public static Integer getOffset() {
		return offset.get();
	}
	
	public static void setOffset(Integer _offset) {
		offset.set(_offset);
	}
	
	public static void removeOffset() {
		offset.remove();
	}
	
	public static Integer getNoticePageSize() {
		return noticePageSize.get();
	}
	
	public static void setNoticePageSize(Integer _size) {
		noticePageSize.set(_size);
	}
	
	public static void removeNoticePageSize() {
		noticePageSize.remove();
	}
	
	public static Integer getMessagePageSize() {
		return messagePageSize.get();
	}
	
	public static void setMessagePageSize(Integer _size) {
		messagePageSize.set(_size);
	}
	
	public static void removeMessagePageSize() {
		messagePageSize.remove();
	}
	
	public static Integer getGoodsListPageSize() {
		return goodsListPageSize.get();
	}
	
	public static void setGoodsListPageSize(Integer _size) {
		goodsListPageSize.set(_size);
	}
	
	public static void removeGoodsListPageSize() {
		goodsListPageSize.remove();
	}
	
}
